local yinyangyu_skill = fk.CreateSkill {

  name = "#yinyangyu_skill",
  attached_equip="yinyangyu",
  tags = {  },

}



yinyangyu_skill:addEffect(fk.AskForRetrial, {
  priority = 0.1,
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(yinyangyu_skill.name) and data.who == player
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askForSkillInvoke(player, "#yinyangyu_skill")
  end,
  on_use = function(self, event, target, player, data)
    local card = table.filter(player:getCardIds(Player.Equip), function(cid)
      return Fk:getCardById(cid).name == "yinyangyu"
    end)
    player.room:retrial(Fk:getCardById(card[1]), player, data, yinyangyu_skill.name, true)
  end,
})

return yinyangyu_skill